QT       += core gui xml sql

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

include(../pub_common.pri)

CONFIG += c++11

# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

SOURCES += \
    DirTree/systreedirmodel.cpp \
    DirTree/systreedirview.cpp \
    Share/dbSqlGlobal.cpp \
    main.cpp \
    mainwindow.cpp \
    sysmainwindow.cpp \
    userconfigs.cpp

HEADERS += \
    DirTree/systreedirmodel.h \
    DirTree/systreedirview.h \
    Share/dbSqlGlobal.h \
    mainwindow.h \
    sysmainwindow.h \
    userconfigs.h

INCLUDEPATH += $$PWD/../framework \
               $$PWD/../log4cplus/include \
               $$PWD/../breakpad

FORMS += \
    mainwindow.ui

win32:CONFIG(release, debug|release): LIBS += -L$$OUT_PWD/../framework/release/ -lframework
else:win32:CONFIG(debug, debug|release): LIBS += -L$$OUT_PWD/../framework/debug/ -lframework
else:unix: LIBS += -L$$OUT_PWD/../framework/ -lframework

contains(QT_ARCH, i386){
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Release/32/ -lcommon
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Debug/32/ -lcommon

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Release/32/ -lcrash_generation_client
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Debug/32/ -lcrash_generation_client

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Release/32/ -lexception_handler
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Debug/32/ -lexception_handler
} else{
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Release/64/ -lcommon
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Debug/64/ -lcommon

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Release/64/ -lcrash_generation_client
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Debug/64/ -lcrash_generation_client

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Release/64/ -lexception_handler
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../breakpad/client/windows/lib/Debug/64/ -lexception_handler
}

contains(QT_ARCH, i386){
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../log4cplus/lib/32/ -llog4cplusSU
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../log4cplus/lib/32/ -llog4cplusSUD
} else{
win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../log4cplus/lib/64/ -llog4cplusSU
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../log4cplus/lib/64/ -llog4cplusSUD
else:unix: LIBS += -L$$PWD/../log4cplus/lib/log4cplusSD.a -llog4cplusSU
}

win32:CONFIG(release, debug|release): LIBS += -L$$PWD/../log4cplus/lib/ -lAdvAPI32
else:win32:CONFIG(debug, debug|release): LIBS += -L$$PWD/../log4cplus/lib/ -lAdvAPI32

# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

DISTFILES += \
    cns/viewer.xml

QMAKE_POST_LINK += $$MY_COPY($$PWD/cns/*, $$OUT_PWD/cns/)

RESOURCES += \
    qss.qrc
